<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-home"></i></a>
    <ul>
        @foreach($controllers as $key=>$controller)
            <li @if(isset($nowController) && $nowController->pid==$controller['id']) class="submenu open" @else class="submenu" @endif>
                <ul>
                    @foreach($controller['children'] as $k => $v)
                        <li @if(isset($nowController) && $nowController->id==$v['id'])class="active"@endif><a
                                    href="{{$v['url']}}">{{$v['name']}}</a></li>
                        @endforeach
                </ul>
            </li>
    </ul>
</div>